Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rtl8139: remove magic numbers #407

Merged
merged 1 commit into from
Dec 31, 2015

Conversation

sarahhodne
Copy link

This removes the many magic numbers for various ports and flags and gives them names, and also switches to using Pio objects directly instead of the inb/outb methods that have a deprecation notice on them
right now (or at least "TODO: Remove this", which is close enough to a deprecation notice).

This removes the many magic numbers for various ports and flags and
gives them names, and also switches to using Pio objects directly
instead of the inb/outb methods that have a deprecation notice on them
right now (or at least "TODO: Remove this", which is close enough to a
deprecation notice).
@sarahhodne
Copy link
Author

There shouldn't be any behaviour changes in this. The image boots up just fine, and the PCI info output during boot using qemu is identical, and pings still work when I use net=tap. I haven't found an easy way to test that other network connectivity is working, so I haven't been able to do in-depth testing.

@jackpot51
Copy link
Member

This is fantastic work. Glad you found the net=tap, arping and ping are the best tests so far. The other drivers need this kind of fixup, the more places inb, outb, etc. are replaced with the safer PioX the better. The same goes for Mmio<T> in memory-mapped drivers.

jackpot51 added a commit that referenced this pull request Dec 31, 2015
@jackpot51 jackpot51 merged commit 34c5b3d into redox-os:master Dec 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants